package com.bank.model.enums;

import lombok.Getter;

/**
 * @author Cejay1314
 * @version 1.0
 * @create 2023/3/25 23:40
 */
@Getter
public enum StatusEum {

    USING(1,"使用中"),
    FREEZON(2, "已冻结"),
    FINISHED(3,"已注销")

    ;
    private Integer code;
    private String message;

    private StatusEum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public static String gertName(int code){
        for(StatusEum item: values()){
            if(item.getCode()==code){
                return item.message;
            }
        }
        return "";
    }
}